Copyright: Snippet © 1996 SFC Software - Patrick J Healey
Citation: Snippet © 1996 SFC Software - Patrick J Healey


Contents
Snippet Version 5.11 32 Bit

Contents

Introduction to Snippet

Registration Details

Toolbar

General Help

Snippet Database

Compact and Repair Database

Backup and Restore Data

Input Box Creator

Create Color Codes

Create Common Dialog Code

Create Picture Buttons

Comment Header

Extract Icons

Gradient Fill Color Code

Message Box Creator

VB Code Window

Comment and Uncomment Code

VB4 32 Bit Launcher

Win Tools

Access the DOS Prompt

Setting up the Icon Editor

Setting up the External Applications

Run Icon Editor

Run External Applications

System Information

Minimizing Snippet

Exiting Snippet


Introduction to Snippet

Welcome to Snippet Version 5.11 © 1996 SFC Software

Snippet Author: Patrick J Healey

Snippet is a VB3 and VB4 Programmers Code Database & More. For Programmers who work in the Windows 95 Environment.

Acknowledgments

Snippet  comes with many pre-defined Snippets for immediate use.

Save your Code Snippets for future use

Add New Snippets, Cut, Copy, Paste, Delete

VB Project Launcher

If VB4 or VB3 is running: All Code can be pasted directly to a Code Window or Module at the Cursor Insertion Point

Quicken style Search

Create Picture Buttons 42 x 42 (Small Buttons 20 x 20 to 41 x 41)

Extract Icons from EXE, DLL, VBX and OCX file types

Create Code for Common Dialog Boxes

Create Code for Message Boxes

Create RGB and Hex Color Codes

Create Gradient Fill Color Code

Create Input Box Code

Open up Frm, Bas and Cls Files For Copying and Pasting of Code to your Project

Comment/Uncomment Code

Create Comment Header

Set up Four External Applications plus Icon Editor

Main Snippet Form will save last Open Position when Exiting

All ™Trademarks are the property of their respective owners.


Registration Details

Snippet 5.11 Registration Details

Registered Users will receive three additional VB4 32 Bit Programs with full source code:

1.  Smiley a Solitaire Game

2.  ToolTips.Frm + ToolTips.Bas (Add to any Project)

3.  Buttons.Vbp - A Picture Button Demo

Snippet Version 5.11 can be registered via SWREG Registration ID: 11329

Run WinCim.Exe and type: GO SWREG and search for Snippet ID: 11329

You may see reference to earlier versions of Snippet - registering with any version automatically registers you with all versions.

"OR"

To become a registered user of Snippet, please fill in the appropriate Registration Form, print it out and send it together with your Check or Money Order to:

EEC Countries:

Patrick J Healey	E-Mail: 100755,102@Compuserve.com

40 William Bentley Court	Telephone Number: 01902-724134

Hickman Street

Wednesfield	Check made payable to: Patrick J Healey

WOLVERHAMPTON

WV11 1QN

United Kingdom

USA and Countries outside the EEC:

Carl G Slutter	E-Mail: hardwood@erols.com

Hardwood Creations	Telephone Number: (301) 924-4276

17500 Princess Anne Drive

Olney, MD 20832	Check made payable to: C G Slutter

USA

You will receive a Serial Number to stop the Unregistered Notices and more Snippets. You will be entitled to all future versions at a cost of Postage & Packaging only (FREE to CompuServe Users). You may not distribute copies of the registered version. Credit card payments not accepted.

Please refer to USA_Register.Txt or EEC_Register.Txt for pricing details.

For More than one user: Please E-Mail or Write for details.

After receipt of the Registration Fee, the Program will be shipped on 3.5" HD Disk or by E-mail.


Snippet Database

To Access the Snippet Database

From the Main Snippet Form do one of the following:

Click on "Snippet menu" and select “Access Snippet Database sub-menu"

Click on “Access Snippet Database” Picture Button

Shortcut Key ALT+S and A

Using the Snippet Database

Adding a New Snippet: To add a New Snippet Click on the Picture Button below:

  Shortcut Key ALT+S and N.

Add a Title to identify your New Snippet, add a Description, Declarations and Code (You must enter at least a Title and Code).

Saving a New Snippet: To save a New Snippet Click on the Picture Button below:

Delete a Snippet: To Delete a Snippet Click on the Picture Button below:

  Shortcut Key ALT+S and D.

Copy a Snippet: To Copy a Snippet Click on the Snippet Title that you wish to Copy. Next, Click the Copy Button below to copy the Snippet to the Clipboard. If VB4 is running: The Snippet Code can be pasted to a Code Window or Module at the Cursor Insertion Point.

  Shortcut Key ALT+S and C.

Moving around the Database

  Move to First Record in the Database. Shortcut Key ALT+D and F

  Move to the Previous Record in the Database. Shortcut Key ALT+D and P

  Move to the Next Record in the Database. Shortcut Key ALT+D and N

  Move to the Last Record in the Database. Shortcut Key ALT+D and L

  Sets a bookmark that uniquely identifies the current record.

  Go to a Bookmark that has been set with “Set a Bookmark”.

Find a Snippet: In the “Find Snippet Title” box, enter the first letter of the Snippet to search for, additional letters can be added to narrow down the search.


Compact and Repair Database

Compact Database

To make the best use of your disk space, you should periodically compact your database.  Compacting rearranges how the Database file is stored on disk if it is fragmented.

To Compact a Database do the following:

Click on "Snippet menu" and select “Compact Database sub-menu"

Shortcut Key ALT+S and C

Repair Database

Repairs a corrupted Database. The Database may become corrupted if  there is a power cut or your computer experiences a hardware problem. The Database will not become corrupted if you quit Snippet normally. In some situations, Snippet may not detect that a Database has become corrupted. If a Database behaves unpredictably, use the Repair Database command to repair it.

To Repair a Database do the following:

Click on "Snippet menu" and select “Repair Database sub-menu"

Shortcut Key ALT+S and R


Toolbar

VB4 32 Bit Project Launcher

Snippet Database

Compact Database

Repair Database

VB Code Window

Create Color Codes

Create Common Dialog Code

Create Picture Buttons

Extract Icons

Message Box Creator

Gradient Fill Color Code

 	Run Icon Editor

 	Run External Applications

Set Reminder

Input Box Creator

Comment Header

Comment Code

Uncomment Code

Minimize Snippet

Exit Snippet


Create Common Dialog Code

To Open the Create Common Dialog Code Form

From the Main Snippet Form do one of the following:

Click on "Tools menu" and select “Common Dialog Creator sub-menu"

Click on “Create Common Dialog Code” Picture Button

Shortcut Key ALT+T and C

A new form will open allowing you to Create Common Dialog Code.

To Create Common Dialog Code

Select the Common Dialog to test.

Click the “Test CommonDialog Button” or:

Click the “Copy Button” to copy Code to the Clipboard.

If VB4 is running: The Common Dialog Code can be pasted to a Code Window or Module at the Cursor Insertion Point.


Create Picture Buttons

To Open the Create Picture Buttons Form

From the Main Snippet Form do one of the following:

Click on "Tools menu" and select “Create Buttons sub-menu"

Click on “Create Picture Buttons” Picture Button

Shortcut Key Alt+T and B

A new form will open allowing you to create the Picture Buttons.

To Create Picture Buttons

First: Chose which Buttons you want to save, Large or Small. Do this by Clicking on either the “Save as Small Buttons” Option  or “Save as Large Buttons” Option at the bottom of the Button Creator Form.

Second: If you want to save Small Buttons then using the Scroll Bar set the Size for the Small Picture Buttons.

Click the Open Picture Button to access a BMP or ICO picture.

Click the Make Picture Button to create the Picture Buttons.

Click the Save Button to Save BitMaps (Registered Version Only). This will prompt you with a Text Box, enter a Name for the Buttons. Next, a small form will appear where you can locate the Directory that you wish to save the Buttons in, click OK when you have located tthe “Save Directory”.

The Button Creator saves Large  Buttons with your name + _Up.BMP, your name + _Dwn.BMP and your name + _Dis.BMP, the Small Buttons are saved with your name + _SUp.BMP, your name + _SDwn.BMP and your name + _SDis.BMP.

Click the Close Button when finished.

Tip: After creation of the Picture Buttons if the DISABLE Picture Button is Blank you need to add a Black Outline to your original BMP or ICO picture file then try again.


Extract Icons

To Open the Extract Icons Form

From the Main Snippet Form do one of the following:

Click on "Tools menu" and select “Extract Icons sub-menu"

Click on “Extract Icons” Picture Button

Shortcut Key ALT+T and E

A new form will open allowing you to Extract Icons.

To Extract Icons

Click the Open Button to access all EXE, DLL, VBX and OCX file types.

Select required file. If successful:

Select Icon to Extract.

Then enter a title for the BMP without an extension.

Then Click the Save Button “and/or” Click the Clipboard Button to copy the Icon to the Clipboard.


Message Box Creator

To Open the Message Box Creator

From the Main Snippet Form do one of the following:

Click on "Tools menu" and select “Message Box Creator sub-menu"

Click on “Message Box Creator” Picture Button

Shortcut Key ALT+T and M

A new form will open allowing you to access the Message Box Creator

To Create Message Box Code

Select Icon if required.

Select type of Buttons. If using the standard “OK” Button then you have the choice of using a Variable or not using a Variable. No Variable is used for the “OK” Button by Default - Click the “Use Variable Check Box” to change the Default. All other Buttons use Variables.

Select Default Button Number (1, or if applicable, 2, or 3)

Select Modal Type.

Enter Message Box Title if required.

Enter at least one Line for the Message.

Click the Preview Button to see the Message Box.

Click the Copy Button to copy code to the Clipboard.

If VB4 is running: The Message Box Code can be pasted to a Code Window or Module at the Cursor Insertion Point.

Click the Close Button when finished.


Access the DOS Prompt

To Access the DOS Prompt

To access the Dos Prompt you must have the file “DOSPRMPT.PIF” in your Windows Directory.

From the Main Snippet Form do one of the following:

Click on "File menu" and select “DOS Prompt"

Shortcut Key Alt+F and D

To quit the DOS Prompt type “Exit” at the DOS Prompt and PRESS the “Enter Key”


Setting up the Icon Editor

To Setup an Icon Editor

From the Main Snippet Form do one of the following:

Click on "Snippet menu" Scroll down to “Preferences” and select “Icon Editor Setup sub-menu"

Shortcut Key ALT+S, P and I


Setting up the External Applications

To Setup the External Applications for the Main Snippet Form pop-up menu

From the Main Snippet Form do one of the following:

Click on "Snippet menu" Scroll down to “Preferences” and select “Setup External App Buttons sub-menu"

Shortcut Key ALT+S, P and S


Run Icon Editor

To Run the Icon Editor

From the Main Snippet Form do the following:

Click on the Toolbar button below:


Run External Applications

To Run the External Applications

From the Main Snippet Form do the following:

Click on the Toolbar button below:

A drop-down menu will appear under the Button allowing you to run an External Application if already setup.


System Information

To access the System Information Form

From the Main Snippet Form do the following:

Click on “File menu” and scroll down to the “Win Tools sub-menu” and select “System Information sub-menu”.

Shortcut Key ALT+F, W and I


Minimizing Snippet

To Minimize Snippet

From the Main Snippet Form do the following:

Click on the Toolbar button below:


Exiting Snippet

To Exit Snippet

From the Main Snippet Form do one of the following:

Click on "File menu" and select “Exit"

Click on “Exit Snippet” Picture Button

If Snippet is minimized: right-click on the“ Snippet Icon” and “Select Quit” from the pop-up menu.

Right-click anywhere on the “Main Snippet Form”, a drop-down menu will appear - select “Exit Snippet”

Shortcut Key ALT+F4

Note: Main Snippet Form will save last Open Position when Exiting.


Create Color Codes

To Open the Create Color Codes Form

From the Main Snippet Form do one of the following:

Click on "Tools menu" and select “RGB Color Codes Sub-menu"

Shortcut Key ALT+T and R

A new form will open allowing you to create the Color Codes.

To Create Color Codes

Use the appropriate Scroll Bars to get the desired Color Effect.

Then Click the appropriate Copy Button to copy the Color Code to the Clipboard.

If VB4 is running: The Color Code can be pasted to a Code Window or Module at the Cursor Insertion Point.


Gradient Fill Color Code

To Open the Create Gradient Fill Color Code Form

From the Main Snippet Form do one of the following:

Click on "Tools menu" and select “Gradient Fill Code Sub-menu"

Shortcut Key ALT+T and G

A new form will open allowing you to create the Gradient Fill Color Code.

To Create Gradient Fill Color Code

First choose Main Color from Top, Bottom or Middle.

Next, choose the Main Color.

Click on the “Show Button”, the Color Box will show the Gradient Effect and the Code Box will show the Code.

Click on the Copy Button to copy the Code to the Clipboard.

If VB4 is running: The Gradient Color Code can be pasted to a Code Window or Module at the Cursor Insertion Point.

Save the Code in a Module and Call in the Form_Load and Form_Resize as Follows: Grad_Fill Form1

Replace Form1 with the Name of the Form that you are calling from.

Note: The Code Box is READ-ONLY and cannot be edited.


Win Tools

To Access the Win Tools

From the Main Snippet Form do the following:

Click on "File menu" and select “Win Tools sub-menu", this will give you access to the following:

Disk Copy                    	Shortcut Key ALT+F, W and C

Disk Format                  	Shortcut Key ALT+F, W and F

Display Properties           	Shortcut Key ALT+F, W and P

Find File                    	Shortcut Key ALT+F, W and N

Selecting any of the Four will SHELL from Snippet and RUN that Selection.


VB Code Window

(REGISTERED VERSION ONLY)

To Open the VB Code  Form

From the Main Snippet Form do one of the following:

Click on "Tools menu" and select “VB Code Window"

Shortcut Key ALT+T and W

To Open a VB .Bas, .Frm or .Cls File Click on the Menu Item “Open VB File” or use the Keyboard Shortcut “ALT+F and O”.

This will open another Window that will give access to all VB Files. Select the VB File that you want to load, the VB File will be loaded into the Text Window where you can search and select code for copying and pasting.

After selection of code Click the “Copy Button” to copy the selected code to the Clipboard.

If VB4 is running: The Selected Code can be pasted to a Code Window or Module at the Cursor Insertion Point.

Note: FRM Files must be saved as Text for the “Open VB File” to be successful.

Note: All FRM’s are Filtered to cut the unwanted Form References, CLS and BAS Files are not Filtered.


Comment and Uncomment Code

To Access the Comment or Uncomment Command

From the Main Snippet Form do one of the following:

Click on "Tools menu" and select “Comment Code sub-menu"

Shortcut Key ALT+T and O

Click on "Tools menu" and select “Uncomment Code sub-menu"

Shortcut Key ALT+T and U

No more apostrophe, down, left, apostrophe, down, left, ...

Before using Comment/Uncomment Code you must select Code in your BAS, CLS or FRM.

Visual Basic does not have a way to comment out whole blocks of code in one action. These two Commands can be used to add or remove the comment symbols ‘* to a block of selected text. Just select the text you want commented out or comments removed from, and hit the appropriate Command.

Note: Do not attempt to Uncomment Code that has not been Commented by Snippet. If an ERROR occurs then the original selected Code will be Pasted back to your Code Window.


General Help

Using the Code Snippets

Select one procedure, function or even a constant name from the title list, you will see the description and declaration of the selected item. Use the "Copy" button to copy the text from the Snippet field into the windows clipboard. From there you can  paste the Snippet into your application or any VB form.

Adding Snippets

If you want to enter a new Snippet, press the "Add New Snippet" button. When you've finished, the new Snippet will be saved within SNIPPET.MDB. For a fast Copy/Paste use the hotkeys "Ctrl+C/Ctrl+V". Fill in a Title to identify the Snippet and fill out any Declarations or Code, add a description or Paste the source via the Clipboard into the relevant Field.

Date/Time and Reminder

Right Clicking on the Date will allow you to change the System Date.

Right Clicking on the Time will allow you to change the System Time.

Left Clicking on the Date/Time will allow you to Set up a Reminder, which will activate a Message Box with your Message at the Set Time. (Quitting Snippet will deactivate this feature).

Set Reminder - Shortcut Key ALT+T and S

Floating Menu

Right Clicking anywhere on the Snippet Form will show a Floating Menu, giving you access to the following Windows Programs: Calculator, Clipboard and Notepad.

Preferences

From the Main Snippet Form Click on the “Snippet Menu”, scroll down to Preferences. This will give you access to the following:

ToolTips On or ToolTips Off - Shortcut Key ALT+S, P and T

Time Date On or Time Date Off - Shortcut Key ALT+S, P and O

Icon Editor Setup - Shortcut Key ALT+S, P and I

Setup External App Buttons - Shortcut Key ALT+S, P and S

Note: All settings are saved in the Registry.


Backup and Restore Data

Backing Up and Restoring the Data Files Snippet.MDB and Snippet.LDB

Backups of Data Files are stored on the A:\ Drive, Restorations of the Backups will search the A:\ Drive only for the Backups.

To Backup the Data Files.

From the Main Snippet Form do the following:

Click on "File menu" and select “Backup Data to A: Drive Sub-menu"

Shortcut Key ALT+F and B

To Restore the Data Files.

From the Main Snippet Form do the following:

Click on "File menu" and select “Restore Data from A: Drive Sub-menu"

Shortcut Key ALT+F and R

Note: Make regular Backups - Your Data is more important than the Programs that use the Data. Programs can be re-installed. Data cannot be replaced unless you have a Backup.


Comment Header

Accessing the Comment Header Form.

To Access the Comment Header Form do the following:

 Click on the “Comment Header Picture Button”

Shortcut Key ALT+T and H

Adding a Comment Header.

Simply fill in the “Author Name”, “Description” for the Comment Header, the “Date of Creation” and “Revision Date”, finally fill in the “Version Number”. Click the Copy Button to copy the Comment Header to the Clipboard.

If VB4 is running: The Comment Header will be pasted to a Code Window or Module at the Cursor Insertion Point.


Input Box Creator

Accessing the Input Box Creator.

To Access the Input Box Creator Form do the following:

 Click on the “Input Box Creator Picture Button”

Shortcut Key ALT+T and I

Creating an Input Box.

Simply fill in the “Input Title”, “Input Prompt” for the Input Box, finally fill in the “Default Value”. Click the Copy Button to copy the Input Box Code to the Clipboard.

If VB4 is running: The Input Box Code will be pasted to a Code Window or Module at the Cursor Insertion Point.


VB4 32 Bit Launcher

To Access the VB4 32 Bit Project Launcher

From the Main Snippet Form do one of the following:

 Click on the “VB4 32 Bit Project Launcher Picture Button”.

Click on "File menu" and select “VB4 32 Bit Project Launcher sub-menu"

Shortcut Key ALT+F and V

Using the VB4 32 Bit Project Launcher

When open the VB4 Launcher will give access to the 4 most recent Project Files “or” VB4 can be run with a New Project.

Clicking on any of the Buttons will Execute the VB32.EXE with the relevant project. The “VB4 32 Bit Launcher” Window will close automatically.

If you have problems using VB4 Project Launcher then check your VB.INI in the Windows Directory. The VB.INI should contain a Heading as follows:

[Visual Basic]

Under the Heading should be a line that reads as foloows:

vbpath=c:\vb4	(Replace the “c:\vb4” with the path of your VB32.EXE)

If the VB.INI does not contain the two lines above then you need to edit the VB.INI with Notepad or any ASCII Editor and enter the missing lines.


Acknowledgments

Lady & Beauty

To my two Cats: Please can I have my Escape Key Cover and F9 Key Cover plus all the Pens that have mysteriously disappeared. (Pity they cannot type?).

Thanks to Karen for putting up with the Damned Computer as she calls it also many thanks to Carl G Slutter for the help and support in creating Snippet 32 Bit.

Also thanks to Pez, Ian & David for not forgetting about me?


Snippet

A small piece of re-usable code